package org.calzz.rpc.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * A built-in controller implementing methods required by JSON-RPC-1.1
 * specification (e.g. <code>describe()</code>) as well as other methods
 * extending this specification.
 * @author Marek Brodziak <marek.brodziak@gmail.com>
 * @author Piotr Pejas <piotr.pejas@gmail.com>
 * @since Mar 8, 2008
 */
@Controller("system")
public class JsonSystemController {
	private JsonServiceDescription jsonServiceDescription;

	/**
	 * Method required by JSON-RPC-1.1 specification. Describes in details the
	 * available methods delivered by this service.
	 * @return serializable service description object
	 */
	public JsonServiceDescription describe() {
		return jsonServiceDescription;
	}

	@Autowired
	public void setJsonServiceDescription(JsonServiceDescription jsonServiceDescription) {
		this.jsonServiceDescription = jsonServiceDescription;
	}

}
